Skip to content

feat(Logics/Temporal/Syntax): temporal formula type and syntax utilities#642

Closed
benbrastmckie wants to merge 5 commits into
leanprover:mainfrom
benbrastmckie:pr3/temporal-syntax
Closed

feat(Logics/Temporal/Syntax): temporal formula type and syntax utilities#642
benbrastmckie wants to merge 5 commits into
leanprover:mainfrom
benbrastmckie:pr3/temporal-syntax

Conversation

@benbrastmckie

Copy link
Copy Markdown

Summary

  • Adds Cslib.Logics.Temporal.Syntax.Formula (582 lines): core temporal formula inductive type
    Formula Atom with primitives {atom, bot, imp, untl, snce}, BEq/Countable/Denumerable
    instances, complexity/depth measures, derived operators (F, G, P, H, W, B, etc.), swap duality
    theorem, and atom enumeration
  • Adds Cslib.Logics.Temporal.Syntax.Context (131 lines): formula list type for proof contexts
    with And/Or/Implies lifting, context difference, and formula membership instances
  • Adds Cslib.Logics.Temporal.Syntax.BigConj (52 lines): big conjunction fold over formula lists
    with simplification lemmas
  • Adds Cslib.Logics.Temporal.Syntax.Subformulas (218 lines): subformula closure with
    decidability, cardinality bounds, and atom content
  • Updates Cslib.lean barrel with 4 new Logics.Temporal.Syntax.* import entries
  • Adds Kamp1968 and GabbayPnueliShelahStavi1980 entries to references.bib

Dependencies

This PR depends on PR #635 (feat(Foundations/Logic): Connectives typeclass)
because Formula.lean imports Cslib.Foundations.Logic.Connectives for the TemporalConnectives
typeclass. This PR is stacked on top of PR #635's branch
(benbrastmckie:refactor/proposition-lukasiewicz) and will not be mergeable until PR #635 merges.

The temporal syntax files themselves are pure syntax — they contain no proofs beyond decide
automation, BEq instances, and basic structural lemmas.

Scope

This PR covers Sub-PR 3.1 (temporal formula type) and Sub-PR 3.2 (syntax utilities). The
utility files (Context, BigConj, Subformulas) have exactly one dependency — Formula.lean
and are pure syntax with no proofs, keeping the combined diff reviewable at ~983 lines.

Subsequent temporal PRs (axioms, derivation, proof system instances, semantics) will follow
in separate stacked PRs.

Files Changed

File Lines Description
Cslib/Logics/Temporal/Syntax/Formula.lean +582 Core formula inductive type
Cslib/Logics/Temporal/Syntax/Context.lean +131 Formula list contexts
Cslib/Logics/Temporal/Syntax/BigConj.lean +52 Big conjunction
Cslib/Logics/Temporal/Syntax/Subformulas.lean +218 Subformula closure
Cslib.lean +4 Barrel imports
references.bib +14 Kamp1968, GabbayPnueliShelahStavi1980

(The PR diff also includes changes from PR #635 since this branch stacks on top of it.)

CI Status

All CI checks pass on this branch (built on top of PR #635 base):

  • lake build --wfail --iofail — no errors or warnings in new files
  • lake exe checkInitImports — all files import Cslib.Init (transitively via Connectives)
  • lake exe lint-style — passes
  • lake exe mk_all --check --module — barrel completeness verified
  • lake test — test suite passes

AI Tools Used

  • Claude Code (cslib-implementation-agent, powered by Claude Sonnet 4.6): created the clean
    pr3/temporal-syntax branch from refactor/proposition-lukasiewicz, added the barrel imports
    to Cslib.lean, added the two BibTeX entries to references.bib, updated the ## References
    section in Formula.lean to use [BibKey] bracket format per CSLib standards, fixed a
    100-character line-length linter violation in the citation, and ran the full CI verification
    pipeline locally. The temporal syntax source files (Formula.lean, Context.lean,
    BigConj.lean, Subformulas.lean) were authored by the human contributor (Benjamin Brast-McKie)
    prior to this PR submission task.

Introduces bot/imp as primitive Proposition constructors (replacing
and/or/impl), adds Connectives.lean typeclass hierarchy for derived
connectives, simplifies NaturalDeduction/Basic.lean from 10 rules to 5,
and adds ChagrovZakharyaschev1997 reference.

Session: sess_1781224549_831844
…ilities

Adds Formula.lean (582 lines), Context.lean (131 lines), BigConj.lean (52 lines),
and Subformulas.lean (218 lines) to Cslib/Logics/Temporal/Syntax/.
… citations

- Add 4 Cslib.Logics.Temporal.Syntax.* entries to Cslib.lean barrel
- Add Kamp1968 and GabbayPnueliShelahStavi1980 entries to references.bib
- Update Formula.lean ## References to use [BibKey] bracket format
@benbrastmckie benbrastmckie deleted the pr3/temporal-syntax branch June 13, 2026 00:10
benbrastmckie added a commit to benbrastmckie/cslib that referenced this pull request Jun 13, 2026
… syntax

Created pr3/temporal-syntax branch from refactor/proposition-lukasiewicz,
cherry-picked all 4 temporal syntax files, added BibTeX entries and BibKey
citations, added 4 barrel imports to Cslib.lean, passed full CI pipeline,
and submitted PR leanprover#642 to leanprover/cslib.

PR URL: leanprover#642

Session: sess_1781307197_e61477
benbrastmckie added a commit to benbrastmckie/cslib that referenced this pull request Jun 14, 2026
… syntax

Created pr3/temporal-syntax branch from refactor/proposition-lukasiewicz,
cherry-picked all 4 temporal syntax files, added BibTeX entries and BibKey
citations, added 4 barrel imports to Cslib.lean, passed full CI pipeline,
and submitted PR leanprover#642 to leanprover/cslib.

PR URL: leanprover#642

Session: sess_1781307197_e61477
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant